<template>
  <div class="posting" @click="showBottom = true">
    <img src="@/assets/images/posting.png" alt="" />
  </div>
  <van-popup
    class="dynamic_popup"
    v-model:show="showBottom"
    round
    position="bottom"
  >
    <div class="popup_content">
      <div class="posting_dynamic label">
        <img src="@/assets/images/posting_updates.png" alt="" />
        <span class="content_text">发动态</span>
      </div>
      <div class="asking_question label">
        <img src="@/assets/images/asking_questions.png" alt="" />
        <span class="content_text">去提问</span>
      </div>
    </div>
  </van-popup>
</template>
<script>
import { Popup } from "vant";
export default {
  setup() {
    const showBottom = ref(false);
    return {
      showBottom,
    };
  },
};
</script>
<style lang="scss">
.posting {
  background: url("/src/assets/images/posting_bg.png") -12px -12px no-repeat;
  height: 60px;
  background-size: 82px 84px;
  width: 60px;
  position: fixed;
  right: 10px;
  bottom: 100px;
  padding: 18px 17px 17px 18px;
}
.dynamic_popup {
  background: url("/src/assets/images/posting_updates_bg.png") 100% no-repeat;
  height: 130px;
  background-size: 100% 100%;
  padding: 21px 15px 0px 16px;
}
.popup_content {
  display: grid;
  grid-template-columns: auto auto;
  grid-column-gap: 16px;
  .label {
    background-color: rgba(255, 255, 255, 1);
    border-radius: 8px;
    padding: 10px 29px;
    display: flex;
    align-items: center;
    img {
      width: 40px;
      height: 40px;
    }
  }
  .content_text {
    margin-left: 10px;
    color: rgba(39, 43, 45, 1);
    font-size: 14px;
    font-family: PingFangSC-Medium;
    font-weight: 500;
    line-height: 20px;
  }
}
.van-popup--round {
  background-color: #fff;
}
</style>
